package com.efast.dmom.equipment.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.dmom.equipment.bean.EquipBomBean;
import com.efast.dmom.equipment.service.masterdata.IEquipBomService;


@Controller
@RequestMapping("/equipment")
public class EquipBomController {
	
	
	@Autowired
	IEquipBomService bomService;

	@RequestMapping(value = "/equipBom/addSpare", method = RequestMethod.POST)
	public @ResponseBody void addSpare(@RequestBody EquipBomBean bean) {
		bomService.addSpare(bean);
	}

	@RequestMapping(value = "/equipBom/deleteSpare", method = RequestMethod.POST)
	public @ResponseBody void deleteSpare(@RequestBody EquipBomBean bean) {
		
		bomService.deleteSpare(bean);
	}

	@RequestMapping(value = "/equipBom/addCategory", method = RequestMethod.POST)
	public @ResponseBody void addCategory(@RequestBody EquipBomBean bean) {
		
		bomService.addCategory(bean);
	}

	@RequestMapping(value = "/equipBom/deleteCategory", method = RequestMethod.POST)
	public @ResponseBody void deleteCategory(@RequestBody EquipBomBean bean) {
		
		bomService.deleteCategory(bean);
	}

	@RequestMapping(value = "/equipBom/deleteParts", method = RequestMethod.POST)
	public @ResponseBody void deleteParts(@RequestBody EquipBomBean bean) {
		
		bomService.deleteParts(bean);
	}

}
